#include <iostream>
#include <list>

using namespace std;

#include "List.h"

void test1()
{
	list<int> lt;
	lt.push_back(1);
	lt.push_back(2); 
	lt.push_back(3);

	list<int>::iterator it = lt.begin();
	while (it != lt.end())
	{
		cout << *it << " ";
		++it;
	}
	cout << endl;

	for (auto e : lt)
	{
		cout << e << " ";
	}
	cout << endl;
}

void test2()
{
	list<int> lt;
	lt.push_back(1);
	lt.push_back(2);
	lt.push_back(3);
	for (auto e : lt)
	{
		cout << e << " ";
	}
	cout << endl;

	lt.reverse();
	for (auto e : lt)
	{
		cout << e << " ";
	}
	cout << endl;
}

void test3()
{
	list<int> lt;
	lt.push_back(5);
	lt.push_back(3);
	lt.push_back(1);
	
	lt.sort();
	//lt.sort(greater<int>());

	for (auto e : lt)
	{
		cout << e << " ";
	}
	cout << endl;
}

void test4()
{
	list<int> lt(5, 1);
	for (auto e : lt)
	{
		cout << e << " ";
	}
	cout << endl;

	lt.unique();
	for (auto e : lt)
	{
		cout << e << " ";
	}
	cout << endl;
}

int main()
{
	//test4();
	lyh::test();

	return 0;
}